package com.yexiao.cofe.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yexiao.cofe.business.pojo.ParamItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ParamItemMapper extends BaseMapper<ParamItem> {

    @Select("select * from param_item order by sort")
    List<ParamItem> listAll();

    @Select("select * from param_item where name = #{name}")
    ParamItem selectByName(String name);

    void modifyParamItem(@Param("id") Integer id, @Param("name") String name, @Param("type") Integer type, @Param("isRequired") Integer isRequired, @Param("sort") Integer sort);
}
